<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        数组中连续的值
    </div>
    <script>
        let testInput = [1,2,2,2,3,4,6,8,9];
        // console.log(topArr)
        function getMax(doubleArr){
            
            for(let i=1;i<doubleArr.length-1;i++){
                if(doubleArr[i-1]==doubleArr[i] && doubleArr[i] == doubleArr[i+1]){
                    console.log(doubleArr[i])
                }
            }
        }   
        getMax(testInput)
    </script>
</body>
</html>